import {MockMethod} from 'vite-plugin-mock'
import {baseApi} from '../../config'

export default [
    {
        url: `${baseApi}/system/operLog/list`,
        params: {pageNum: 1, pageSize: 10},
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "currentPage": 1,
                    "total": 125,
                    "list": [
                        {
                            "operId": 125,
                            "title": "登录日志",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/loginLog/list?pageNum=1&pageSize=10&status=&ipaddr=&loginLocation=&userName=",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{\"ipaddr\":\"\",\"loginLocation\":\"\",\"pageNum\":\"1\",\"pageSize\":\"10\",\"status\":\"\",\"userName\":\"\"}",
                            "operTime": "2024-11-08 09:20:05"
                        },
                        {
                            "operId": 124,
                            "title": "",
                            "requestMethod": "DELETE",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/loginLog/clear",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{}",
                            "operTime": "2024-11-08 09:20:05"
                        },
                        {
                            "operId": 123,
                            "title": "登录日志",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/loginLog/list?pageNum=1&pageSize=10&status=&ipaddr=&loginLocation=&userName=",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{\"ipaddr\":\"\",\"loginLocation\":\"\",\"pageNum\":\"1\",\"pageSize\":\"10\",\"status\":\"\",\"userName\":\"\"}",
                            "operTime": "2024-11-08 09:18:49"
                        },
                        {
                            "operId": 122,
                            "title": "",
                            "requestMethod": "DELETE",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/loginLog/delete?ids%5B0%5D=5",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{\"ids\":{\"0\":\"5\"}}",
                            "operTime": "2024-11-08 09:18:49"
                        },
                        {
                            "operId": 121,
                            "title": "登录日志",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/loginLog/list?pageNum=1&pageSize=10&status=&ipaddr=&loginLocation=&userName=",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{\"ipaddr\":\"\",\"loginLocation\":\"\",\"pageNum\":\"1\",\"pageSize\":\"10\",\"status\":\"\",\"userName\":\"\"}",
                            "operTime": "2024-11-08 09:16:07"
                        },
                        {
                            "operId": 120,
                            "title": "",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/dict/data/getDictData?dictType=admin_login_status&defaultValue=",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{\"defaultValue\":\"\",\"dictType\":\"admin_login_status\"}",
                            "operTime": "2024-11-08 09:16:07"
                        },
                        {
                            "operId": 119,
                            "title": "服务监控",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/monitor/server",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{}",
                            "operTime": "2024-11-08 09:16:05"
                        },
                        {
                            "operId": 118,
                            "title": "服务监控",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/monitor/server",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{}",
                            "operTime": "2024-11-08 09:16:00"
                        },
                        {
                            "operId": 117,
                            "title": "服务监控",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/monitor/server",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{}",
                            "operTime": "2024-11-08 09:15:56"
                        },
                        {
                            "operId": 116,
                            "title": "服务监控",
                            "requestMethod": "GET",
                            "operName": "demo",
                            "deptName": "财务部门",
                            "linkedDeptName": null,
                            "operUrl": "/api/v1/system/monitor/server",
                            "operIp": "::1",
                            "operLocation": "内网IP",
                            "operParam": "{}",
                            "operTime": "2024-11-08 09:15:51"
                        }
                    ]
                }
            }
        }
    },
    {
        url: `${baseApi}/system/operLog/delete`,
        params: {"operIds": [125]},
        method: 'delete',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/operLog/clear`,
        method: 'delete',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": null
            }
        }
    },
    {
        url: `${baseApi}/system/operLog/get`,
        params: {operId: 3},
        method: 'get',
        response: () => {
            return {
                "code": 0,
                "message": "",
                "data": {
                    "operId": 3,
                    "title": "服务监控",
                    "businessType": 0,
                    "method": "/api/v1/system/monitor/server",
                    "requestMethod": "GET",
                    "operatorType": 1,
                    "operName": "demo",
                    "deptName": "财务部门",
                    "linkedDeptName": null,
                    "operUrl": "/api/v1/system/monitor/server",
                    "operIp": "::1",
                    "operLocation": "内网IP",
                    "operParam": "{}",
                    "errorMsg": "",
                    "operTime": "2024-11-08 09:24:19"
                }
            }
        }
    },
] as MockMethod[]
